# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=tree
pkgver=2.1.1
pkgrel=1
pkgdesc="A directory listing program displaying a depth indented list of files"
arch=('loong64' 'x86_64')
url="https://gitlab.com/OldManProgrammer/unix-tree"
license=('GPL')
depends=('glibc')
source=("https://gitlab.com/OldManProgrammer/unix-tree/-/archive/${pkgver}/unix-tree-${pkgver}.tar.gz")
sha512sums=('997d20c5508d3eba026e9d621a4da2b3b0bf111d272bb7d705a9a0819d430887061e234f0a00ac3102c43413ef716c1371ee0620b8460fbd523d4a3790940a29')

prepare() {
  cd "unix-tree-${pkgver}"
  sed -i -e '/^CFLAGS/d' -e '/^LDFLAGS/d' Makefile
}

build() {
  cd "unix-tree-${pkgver}"
  make
}

package() {
  cd "unix-tree-${pkgver}"
  make PREFIX="${pkgdir}/usr" MANDIR="${pkgdir}/usr/share/man" install
}
